<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateStoreDocumentTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateStoreDocumentLabel_idStoreDocument}" for="idStoreDocument" />
                    <h:inputText id="idStoreDocument" value="#{storeDocumentController.selected.idStoreDocument}" title="#{bundle.CreateStoreDocumentTitle_idStoreDocument}" required="true" requiredMessage="#{bundle.CreateStoreDocumentRequiredMessage_idStoreDocument}"/>
                    <h:outputLabel value="#{bundle.CreateStoreDocumentLabel_nomStoreDocument}" for="nomStoreDocument" />
                    <h:inputText id="nomStoreDocument" value="#{storeDocumentController.selected.nomStoreDocument}" title="#{bundle.CreateStoreDocumentTitle_nomStoreDocument}" required="true" requiredMessage="#{bundle.CreateStoreDocumentRequiredMessage_nomStoreDocument}"/>
                    <h:outputLabel value="#{bundle.CreateStoreDocumentLabel_typeDocument}" for="typeDocument" />
                    <h:inputText id="typeDocument" value="#{storeDocumentController.selected.typeDocument}" title="#{bundle.CreateStoreDocumentTitle_typeDocument}" required="true" requiredMessage="#{bundle.CreateStoreDocumentRequiredMessage_typeDocument}"/>
                    <h:outputLabel value="#{bundle.CreateStoreDocumentLabel_dateDerniereModification}" for="dateDerniereModification" />
                    <h:inputText id="dateDerniereModification" value="#{storeDocumentController.selected.dateDerniereModification}" title="#{bundle.CreateStoreDocumentTitle_dateDerniereModification}" required="true" requiredMessage="#{bundle.CreateStoreDocumentRequiredMessage_dateDerniereModification}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateStoreDocumentLabel_contenuDocument}" for="contenuDocument" />
                    <h:inputTextarea rows="4" cols="30" id="contenuDocument" value="#{storeDocumentController.selected.contenuDocument}" title="#{bundle.CreateStoreDocumentTitle_contenuDocument}" required="true" requiredMessage="#{bundle.CreateStoreDocumentRequiredMessage_contenuDocument}"/>
                    <h:commandLink action="#{storeDocumentController.addFile}" value="Choississez un fichier..." />
                    
                </h:panelGrid>
                <br />
                <h:commandLink action="#{storeDocumentController.create}" value="#{bundle.CreateStoreDocumentSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{storeDocumentController.prepareList}" value="#{bundle.CreateStoreDocumentShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.CreateStoreDocumentIndexLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
